export const state = {
  locale: "VI",
  loading: false //loading默认值
};

export const mutations = {
  //设置多语言
  SET_LANG(state, locale) {
    state.locale = locale;
  },

  // 开始loading
  startLoading(state) {
    state.loading = true;
  },

  // 结束loading
  endLoading(state) {
    state.loading = false;
  },

  //登录过期
  login_out(state) {
    localStorage.setItem("token", "");
    localStorage.setItem("platformId", "");
    localStorage.setItem("userInfo", "");
    localStorage.setItem("configs", "");
    this.$router.push("/login");
  }
};
